<?php
include "connect.php"; //untuk melakukan koneksi db

print "<link rel='stylesheet' href='style.css' type='text/css'>";

print "<A href='post.php'>Topik Baru</a><br>";

print "<table class='maintable'>";

print "<tr class='headline'><td width=50%>Topik</td><td width=20%>Nama</td><td>Balasan</td><td>Balasan Terakhir</td></tr>";

$getthreads="SELECT * from forum_posting where parentid='0' order by lastrepliedto DESC";

$getthreads2=mysql_query($getthreads) or die("Tidak Dapat Memulai Thread");

while($getthreads3=mysql_fetch_array($getthreads2))

{

$getthreads3[title]=strip_tags($getthreads3[title]);

$getthreads3[author]=strip_tags($getthreads3[author]);

print "<tr class='mainrow'><td><A href='message.php?id=$getthreads3[postid]'>$getthreads3[title]</a></td><td>$getthreads3[author]</td><td>$getthreads3[numreplies]</td><td>$getthreads3[showtime]<br>Pesan Terakhir Dari <b>$getthreads3[lastposter]</b></td></tr>";

}

print "</table>";
?>